CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include_directories(${COMN_DIR}/include)
include_directories(include)
include_directories(.)

include_directories(${DIR_FFMPEG}/include)

if (MSVC)
include_directories(${THIRD_PARTY}/stdint)
endif()

link_directories(${COMN_DIR}/lib)
link_directories(${DIR_FFMPEG_LIB})
link_directories(${DIR_FFMPEG}/bin)


aux_source_directory(. SOURCES)

add_library(G711Encoder SHARED ${SOURCES})

target_link_libraries(G711Encoder
	${LIB_PLATFORM}
	debug comnd optimized comn
	${LIB_FFMPEG}
	)

set_target_properties(G711Encoder PROPERTIES LINK_INTERFACE_LIBRARIES "")
set_target_properties(G711Encoder PROPERTIES INTERFACE_LINK_LIBRARIES "")

if(CMAKE_TOOLCHAIN_FILE)
add_custom_command(TARGET G711Encoder
	POST_BUILD
	COMMAND ${CMAKE_STRIP} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libG711Encoder.so
	)
endif()

install(TARGETS G711Encoder DESTINATION lib)
